<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="单据跟踪 – 扫条码查进度" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script src="/js/popup_ext.js"></script>
<script language="javascript">
    function doShow(id,type){
        var url="";
        var h=500;
       	if(type=="DELIVER"){
          url = "/business/DeliverBillEdit.ihtm?id="+id;
        }else if(type=="SETU"){
          url = "/business/SetuBillEdit.ihtm?id="+id;
       	}else if(type=="RECEIVE"){
          url = "/finance/ReceiveBillEdit.ihtm?id="+id;
       	}else if(type=="ADJUST"){
          url = "/finance/AdjustBillEdit.ihtm?id="+id;
       	}else if(type=="OUT"){
          url = "/storehouse/OutBillEdit.ihtm?id="+id;
       	}else if(type=="FEE"){
          url = "/finance/FeeBillEdit.ihtm?id="+id;
          h=420;
       	}else if(type=="COOPER"){
          url = "/cooper/CooperBillEdit.ihtm?id="+id;
        }else if(type=="GATHER"){
          url = "/cooper/GatherBillEdit.ihtm?id="+id;
       	}else{
       		return;
       	}
       	ShowIframe("查看",url,1024,h,"refreshWin()",1024,h);
	}
	function refreshWin(){
		if(popRetVal!=null){
			window.location.reload(true);
		}
	}
	function doCopy(code){
		if(checkNavigator()[0]=="msie"){
			window.clipboardData.setData("Text",code);
			ShowAlert('提示框','复制成功！',200,100);
		}else{
			ShowAlert('提示框','对不起，当前浏览器不支持剪帖板功能！',200,100);
		}
	}
	function doDownload(id,fileName,sourceName){
		var xmlHttp=createXMLHttpRequest();
		xmlHttp.open("GET", "/FileDownloadLog.ihtm?id="+id);
		xmlHttp.onreadystatechange = function(){
			doDownloadCallback(xmlHttp,fileName,sourceName);
		};
		xmlHttp.send(null);
	}
	function doDownloadCallback(xmlHttp,fileName,sourceName){
    	if (xmlHttp.readyState == 4) {
      		if (xmlHttp.status == 200) {
      			var resTxt=xmlHttp.responseText;
      			if(resTxt=="NO_LOGIN"){
      				ShowAlert('提示框','你还没登录或已经超时，请重新登录。',200,100);
      			}else if(resTxt=="OK"){
      				window.location="/FileDownload.ihtm?file_name="+encodeURIComponent(fileName)+"&source_name="+encodeURIComponent(sourceName);
      			}
			}
		}
	}
	function doInit(){
		if(window.screen.availWidth>1024){
			var w=window.screen.availWidth*0.98;
			window.resizeTo(w,600);
			document.getElementById("mainDiv").style.width=(w-60)+"px";
			//居中
			var resizeWinTop=(window.screen.availHeight-600)/2;
			var resizeWinLeft=(window.screen.availWidth-w)/2;
			window.moveTo(resizeWinLeft,resizeWinTop);
		}
		document.getElementById("search_key").focus();
	}
	function doEdit(id){
		var url="/business/BusinessBillEdit.ihtm?edit_type=MODIFY&id="+id+"&alert_type=FORM";
		showWin(1024,600,url);
	}
	function checkSearchKey(){
		if(window.event.keyCode==13){
			doSearch();
		}
	}
	function doSearch(){
		var searchKey=encodeURIComponent(document.getElementById("search_key").value.trim());
		window.location="/business/BusinessRelBillList.ihtm?code="+searchKey;
	}
</script>
</head>
<body oncontextmenu="return false"  class="sheet" onLoad="doInit();">
<div class="sheet-main" style="width:980px" id="mainDiv">
  <div class="sheet-top">
    <div class="content">
      <h2>单据跟踪 – 扫条码查进度 <c:if test="${bill!=null}">&nbsp;&nbsp;${bill.billCode}<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';BUSI_MODI;')!=-1}">&nbsp;&nbsp;<span style="font-size:14px"><a href="javascript:doEdit(${bill.id});">修改业务单</a></span></c:if></c:if></h2>
      <p>扫描业务单号条码，或者录入业务单号，可以查询业务单进度</p>
    </div>
  </div>
  
  <div class="sheet-list">
    <div class="search-business">
    	<div class="content" style="+zoom:1;">
        <table width="100%">
          <tbody>
            <tr>
				<td align="right">
	              <input type="text" class="TextBox" id="search_key" name="search_key" onKeyUp="checkSearchKey();" style="width:100px" value="">
	              <input type="button" class="buttom search-but" value=" 查 询" onClick="doSearch();">
				</td>
            </tr>    
           </tbody>
        </table>
      	</div>
    	<%@include file="../inc/AlertMsg.jsp"%>
    	
	<div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">项目明细（预付款${bill.imprest}）</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th width="10%" >项目类型</th>
			   	<th width="10%" >内容</th>
				<th width="10%" >材质</th>
				<th width="12%" >规格</th>
				<th width="6%" >单位</th>
				<th width="6%" >数量</th>
				<th width="12%" >完成情况</th>
				<th width="8%" >当前工序</th>
				<th width="6%" >完工状态</th>
				<th width="8%" >操作员</th>
				<th width="12%" >操作时间</th>
			</tr>
			<c:if test="${fn:length(itemList)==0}">
			<tr>
				<td colspan="11">没有项目明细</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(itemList)>0}">
			<c:forEach var="item" items="${itemList}" varStatus="i">
				<tr>
					<td>${item.makeTypeName}</td>
					<td><commonTag:parseEnterToBr source="${item.businessBillItem.finishedContent}" /></td>
					<td>${item.businessBillItem.proName}</td>
					<td>
						<commonTag:parseEnterToBr source="${item.businessBillItem.specification}" />
						<c:if test="${item.businessBillItem.priceType=='AREA' || item.businessBillItem.priceType=='LENGTH'}"> x <commonTag:parseBigDecimal source="${item.businessBillItem.amount}" /></c:if>
					</td>
					<td>
						<c:if test="${item.businessBillItem.priceType=='AREA'}">平方米</c:if>
						<c:if test="${item.businessBillItem.priceType=='LENGTH'}">
							<c:if test="${item.businessBillItem.lengType=='M'}">米</c:if><c:if test="${item.businessBillItem.lengType=='CM'}">公分</c:if>
						</c:if>
						<c:if test="${item.businessBillItem.priceType=='AMOUNT'}">${item.businessBillItem.unit}</c:if>
					</td>
					<td>
						<c:if test="${item.businessBillItem.priceType=='AREA' || item.businessBillItem.priceType=='LENGTH'}"><commonTag:parseBigDecimal source="${item.businessBillItem.squareNum}" /></c:if>
						<c:if test="${item.businessBillItem.priceType=='AMOUNT'}"><commonTag:parseBigDecimal source="${item.businessBillItem.amount}" /></c:if>
					</td>
					<td><commonTag:parseEnterToBr source="${item.businessBillItemExt.compStr}" /></td>
					<td>
						<c:if test="${item.businessBillItem.isCoop=='Y'}">外协</c:if>
						<c:if test="${item.businessBillItem.wcId!=0 && item.businessBillItemExt.wcComp!='Y'}">
							<c:if test="${item.businessBillItemExt.maked=='N'}">未开工</c:if>
							<c:if test="${item.businessBillItemExt.maked=='Y'}"><commonTag:showSimpleObjectName list="${proList}" objectId="${item.businessBillItemExt.proId}" /></c:if>
						</c:if>
					</td>
					<td>
						<c:if test="${item.businessBillItem.wcId==0 && item.businessBillItem.isCoop=='N'}"><c:if test="${billExt.examined=='N'}">未完工</c:if><c:if test="${billExt.examined=='Y'}">已完工</c:if></c:if>
						<c:if test="${item.businessBillItem.wcId!=0 || item.businessBillItem.isCoop=='Y'}">
							<c:if test="${item.businessBillItem.wcId!=0}">
								<c:if test="${item.businessBillItemExt.wcComp=='Y'}">自制已完</c:if>
								<c:if test="${item.businessBillItemExt.wcComp=='N'}">自制未完</c:if>
							</c:if>
							<c:if test="${item.businessBillItem.isCoop=='Y'}">
								<c:if test="${item.businessBillItem.wcId!=0}"><br></c:if>
								<c:if test="${item.businessBillItemExt.coopComp=='Y'}">外协已完</c:if>
								<c:if test="${item.businessBillItemExt.coopComp=='N'}">外协未完</c:if>
							</c:if>
						</c:if>
					</td>
					<td>
						<c:if test="${item.businessBillItemExt.operId!=0}">${item.businessBillItemExt.operName}</c:if>
					</td>
					<td>
						<c:if test="${item.businessBillItemExt.operId!=0}"><fmt:formatDate value="${item.businessBillItemExt.operTime}" pattern="yyyy-MM-dd HH:mm"/></c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
	 </div>
	 <div class="blank12"></div>
	 
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">附件</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th  width="18%">文件</th>
				<th  width="18%">资料路径</th>
				<th  width="20%">文件说明</th>
				<th  width="10%">工作中心</th>
				<th  width="4%">类型</th>
				<th  width="8%">上传人</th>
				<th  width="14%">上传时间</th>
				<th  width="8%">操作</th>
			</tr>
			<c:if test="${fn:length(accList)==0}">
			<tr>
				<td colspan="8">没有附件</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(accList)>0}">
			<c:forEach var="item" items="${accList}" varStatus="i">
				<tr>
					<td >
						<c:if test="${item.fileName!=null && item.fileName!=''}"><a href="${item.fileName}" target="_blank">${item.sourceName}</a></c:if>
						<c:if test="${item.fileName==null || item.fileName==''}">${item.sourceName}</c:if>
					</td>
					<td >${item.customPath}</td>
					<td >${item.mark}</td>
					<td ><commonTag:showSimpleObjectName list="${workCenterList}" objectId="${item.extId}" /></td>
					<td >
						<c:if test="${item.accType=='DESIGN'}">自制</c:if>
						<c:if test="${item.accType=='COOPER'}">外协</c:if>
						<c:if test="${item.accType=='CONTRACT'}">合同</c:if>
					</td>
					<td >${item.createrName}</td>
					<td ><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm"/></td>
					<td>
						<c:if test="${item.fileName!=null && item.fileName!=''}"><a href="javascript:doDownload('${item.id}','${item.fileName}','${item.sourceName}');">下载</a></c:if>
						<c:if test="${item.fileName==null || item.fileName==''}">下载</c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
     </div>
     <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">打印记录</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th width="20%" >打印时间</th>
				<th width="20%">打印人</th>
				<th width="20%">类型</th>
				<th width="40%"><div align="left">金额</div></th>
			</tr>
			<c:if test="${fn:length(printList)==0}">
			<tr>
				<td colspan="4">没有打印记录</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(printList)>0}">
			<c:forEach var="item" items="${printList}" varStatus="i">
				<tr>
					<td><fmt:formatDate value="${item.printTime}" pattern="yyyy-MM-dd HH:mm"/></td>
					<td>${item.printerName}</td>
					<td>
						<c:if test="${item.printType=='BUS_COST'}">业务单</c:if>
						<c:if test="${item.printType=='BUS_NO_COST'}">制作单</c:if>
						<c:if test="${item.printType=='MAKE'}">制作单</c:if>
						<c:if test="${item.printType=='LITTLE'}">小票</c:if>
						<c:if test="${item.printType=='SALE'}">销售单</c:if>
					</td>
					<td>
						<div align="left">${item.cost}</div>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
	 </div>
	 <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">下载记录</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th width="20%" >下载时间</th>
				<th width="20%">下载人</th>
				<th width="60%"><div align="left">下载文件名</div></th>
			</tr>
			<c:if test="${fn:length(dlList)==0}">
			<tr>
				<td colspan="3">没有下载记录</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(dlList)>0}">
			<c:forEach var="item" items="${dlList}" varStatus="i">
				<tr>
					<td><fmt:formatDate value="${item[0]}" pattern="yyyy-MM-dd HH:mm"/></td>
					<td>${item[1]}</td>
					<td>
						<div align="left">${item[2]}</div>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
	 </div>
	 <div class="blank12"></div>
     
	 <div class="table-list">
	 	<fieldset class="det_fieldset ">
     	<legend class="mag10">改单记录</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th width="20%" >订货日期</th>
			   	<th width="20%" >交货日期</th>
				<th width="20%" >优惠金额</th>
				<th width="20%" >折后金额</th>
				<th width="10%" >改单人</th>
				<th width="10%" >改单时间</th>
			</tr>
			<c:if test="${fn:length(businessLogList)==0}">
			<tr>
				<td colspan="6">没有改单记录</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(businessLogList)>0}">
			<c:forEach var="item" items="${businessLogList}" varStatus="i">
				<tr>
					<td>${item.orderDate}</td>
					<td>${item.deliverDate}</td>
					<td>${item.favCost}</td>
					<td>${item.cost}</td>
					<td>${item.updateName}</td>
					<td><fmt:formatDate value="${item.updateDate}" pattern="yyyy-MM-dd HH:mm"/></td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
	 </div>
	 <div class="blank12"></div>
     
     <div class="table-list">
        <fieldset class="det_fieldset ">
     	<legend class="mag10">消息</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th width="10%">时间</th>
			   	<th width="30%">主题</th>
			   	<th width="50%">内容</th>
				<th width="10%">发送人</th>
			</tr>
			<c:if test="${fn:length(msgList)==0}">
			<tr>
				<td colspan="4">没有消息记录</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(msgList)>0}">
			<c:forEach var="item" items="${msgList}" varStatus="i">
				<tr>
					<td><fmt:formatDate value="${item.sendTime}" pattern="yyyy-MM-dd HH:mm"/></td>
					<td>${item.title}</td>
					<td>${item.content}</td>
					<td>${item.senderName}</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
	 </div>
	 <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">送货单</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th  width="14%">送货单号</th>
				<th  width="12%">日期</th>
				<th  width="26%">物流公司</th>
				<th  width="14%">物流单号</th>
				<th  width="6%">开单人</th>
				<th  width="6%">送货人</th>
				<th  width="6%">审核状态</th>
				<th  width="6%">送货状态</th>
				<th  width="10%">操作</th>
			</tr>
			<c:if test="${fn:length(deliverList)==0}">
			<tr>
				<td colspan="7">没有送货单</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(deliverList)>0}">
			<c:forEach var="item" items="${deliverList}" varStatus="i">
				<tr>
					<td >${item.billCode}</td>
					<td ><fmt:formatDate value="${item.deliverDate}" pattern="yyyy-MM-dd"/></td>
					<td >${item.deliComp}</td>
					<td >${item.deliCode}</td>
					<td >${item.createrName}</td>
					<td ><c:if test="${item.examined=='Y' && item.sended=='Y'}">${item.senderName}</c:if></td>
					<td >
						<c:if test="${item.examined=='N'}">未审核</c:if>
						<c:if test="${item.examined=='Y'}">已审核</c:if>
					</td>
					<td >
						<c:if test="${item.examined=='N' || item.sended=='N'}">未送货</c:if>
						<c:if test="${item.examined=='Y' && item.sended=='Y'}">已送货</c:if>
					</td>
					<td>
						<a href="javascript:doCopy('${item.billCode}');">复制单号</a>
						<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';DELI_BILL_SEAR;')!=-1}">
						    <a href="javascript:doShow('${item.id }','DELIVER');">查看</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
	 </div>
	 <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">安装单</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th  width="20%">安装单号</th>
				<th  width="20%">日期</th>
				<th  width="20%">开单人</th>
				<th  width="20%">状态</th>
				<th  width="20%">操作</th>
			</tr>
			<c:if test="${fn:length(setuList)==0}">
			<tr>
				<td colspan="5">没有安装单</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(setuList)>0}">
			<c:forEach var="item" items="${setuList}" varStatus="i">
				<tr>
					<td >${item.billCode}</td>
					<td ><fmt:formatDate value="${item.billDate}" pattern="yyyy-MM-dd"/></td>
					<td >${item.creaName}</td>
					<td >
						<c:if test="${item.exam=='N'}">未审核</c:if>
						<c:if test="${item.exam=='Y'}">已审核</c:if>
					</td>
					<td>
						<a href="javascript:doCopy('${item.billCode}');">复制单号</a>
						<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';SETU_BILL_SEAR;')!=-1}">
						    <a href="javascript:doShow('${item.id }','SETU');">查看</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
	 </div>
	 <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">收款单</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th  width="20%">收款单号</th>
				<th  width="20%">日期</th>
				<th  width="20%">开单人</th>
				<th  width="20%">状态</th>
				<th  width="20%">操作</th>
			</tr>
			<c:if test="${fn:length(receiveList)==0}">
			<tr>
				<td colspan="5">没有收款单</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(receiveList)>0}">
			<c:forEach var="item" items="${receiveList}" varStatus="i">
				<tr>
					<td >${item.billCode}</td>
					<td ><fmt:formatDate value="${item.receiveDate}" pattern="yyyy-MM-dd"/></td>
					<td >${item.createrName}</td>
					<td >
						<c:if test="${item.examined=='N'}">未审核</c:if>
						<c:if test="${item.examined=='Y'}">已审核</c:if>
					</td>
					<td>
						<a href="javascript:doCopy('${item.billCode}');">复制单号</a>
						<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';RECE_BILL_SEAR;')!=-1}">
					       <a href="javascript:doShow('${item.id}','RECEIVE');">查看</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
     </div>
     <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">调帐单</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th  width="20%">调账单号</th>
				<th  width="20%">日期</th>
				<th  width="20%">开单人</th>
				<th  width="20%">状态</th>
				<th  width="20%">操作</th>
			</tr>
			<c:if test="${fn:length(adjustList)==0}">
			<tr>
				<td colspan="5">没有调账单</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(adjustList)>0}">
			<c:forEach var="item" items="${adjustList}" varStatus="i">
				<tr>
					<td >${item.billCode}</td>
					<td ><fmt:formatDate value="${item.adjustDate}" pattern="yyyy-MM-dd"/></td>
					<td >${item.createrName}</td>
					<td >
						<c:if test="${item.examined=='N'}">未审核</c:if>
						<c:if test="${item.examined=='Y'}">已审核</c:if>
					</td>
					<td>
						<a href="javascript:doCopy('${item.billCode}');">复制单号</a>
						<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';ADJU_BILL_SEAR;')!=-1}">
							<a href="javascript:doShow('${item.id}','ADJUST');">查看</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
     </div>
     <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">外协单</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th  width="20%">外协单号</th>
				<th  width="20%">日期</th>
				<th  width="20%">开单人</th>
				<th  width="20%">状态</th>
				<th  width="20%">操作</th>
			</tr>
			<c:if test="${fn:length(cooperList)==0}">
			<tr>
				<td colspan="5">没有外协单</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(cooperList)>0}">
			<c:forEach var="item" items="${cooperList}" varStatus="i">
				<tr>
					<td >${item[0].billCode}</td>
					<td ><fmt:formatDate value="${item[0].cooperDate}" pattern="yyyy-MM-dd"/></td>
					<td >${item[0].createrName}</td>
					<td >
						<c:if test="${item[1]=='N'}">未审核</c:if>
						<c:if test="${item[1]=='Y'}">已审核</c:if>
					</td>
					<td>
						<a href="javascript:doCopy('${item[0].billCode}');">复制单号</a>
						<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';COOP_BILL_SEAR;')!=-1}">
							<a href="javascript:doShow('${item[0].id }','COOPER')">查看</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
     </div>
     <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">外协收货</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th  width="20%">单号</th>
				<th  width="20%">日期</th>
				<th  width="20%">开单人</th>
				<th  width="20%">状态</th>
				<th  width="20%">操作</th>
			</tr>
			<c:if test="${fn:length(gatherList)==0}">
			<tr>
				<td colspan="5">没有外协收货</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(gatherList)>0}">
			<c:forEach var="item" items="${gatherList}" varStatus="i">
				<tr>
					<td >${item.billCode}</td>
					<td ><fmt:formatDate value="${item.gatherDate}" pattern="yyyy-MM-dd"/></td>
					<td >${item.createrName}</td>
					<td >
						<c:if test="${item.examined=='N'}">未审核</c:if>
						<c:if test="${item.examined=='Y'}">已审核</c:if>
					</td>
					<td>
						<a href="javascript:doCopy('${item.billCode}');">复制单号</a>
						<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';GATH_BILL_SEAR;')!=-1}">
							<a href="javascript:doShow('${item.id }','GATHER')">查看</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
     </div>
     <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">出库单</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th  width="20%">出库单号</th>
				<th  width="20%">日期</th>
				<th  width="20%">开单人</th>
				<th  width="20%">状态</th>
				<th  width="20%">操作</th>
			</tr>
			<c:if test="${fn:length(outList)==0}">
			<tr>
				<td colspan="5">没有出库单</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(outList)>0}">
			<c:forEach var="item" items="${outList}" varStatus="i">
				<tr>
					<td >${item.billCode}</td>
					<td ><fmt:formatDate value="${item.outDate}" pattern="yyyy-MM-dd"/></td>
					<td >${item.createrName}</td>
					<td >
						<c:if test="${item.examined=='N'}">未审核</c:if>
						<c:if test="${item.examined=='Y'}">已审核</c:if>
					</td>
					<td>
						<a href="javascript:doCopy('${item.billCode}');">复制单号</a>
						<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';OUT_BILL_SEAR;')!=-1}">
							<a href="javascript:doShow('${item.id}','OUT');">查看</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
     </div>
     <div class="blank12"></div>
     
     <div class="table-list">
     	<fieldset class="det_fieldset ">
     	<legend class="mag10">费用单</legend>
        <table width="98%" align="center">
           	<tr>
			   	<th  width="20%">费用单号</th>
				<th  width="20%">日期</th>
				<th  width="20%">开单人</th>
				<th  width="20%">状态</th>
				<th  width="20%">操作</th>
			</tr>
			<c:if test="${fn:length(feeList)==0}">
			<tr>
				<td colspan="5">没有费用单</td>
			</tr>
			</c:if>
			<c:if test="${fn:length(feeList)>0}">
			<c:forEach var="item" items="${feeList}" varStatus="i">
				<tr>
					<td >${item[2]}</td>
					<td ><fmt:formatDate value="${item[1]}" pattern="yyyy-MM-dd"/></td>
					<td >${item[5]}</td>
					<td >
						<c:if test="${item[6]=='N'}">未审核</c:if>
						<c:if test="${item[6]=='Y'}">已审核</c:if>
					</td>
					<td>
						<a href="javascript:doCopy('${item[2]}');">复制单号</a>
						<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';FEE_BILL_SEAR;')!=-1}">
							<a href="javascript:doShow('${item[0].billId}','FEE');">查看</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
			</c:if>
		</table>
		</fieldset>
     </div>
     <div class="blank12"></div>
     
    </div>
  </div>
</div>	
</body>
</html>